#define MSREBOOT_C
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#if defined(OS_LINUX_SOC)
#include <sys/reboot.h>
#endif
#include <libmslog/mslog.h>
#include "mscommon.h"
#include "mstime.h"

#define FLAG "REBOOT"
ms_void ms_api_reboot(ms_void)
{
#if defined(OS_LINUX_SOC)
	sync(); 
	reboot(RB_AUTOBOOT);
#else
	ms_funcNosupports;
#endif	
}
ms_void ms_api_forceReboot(ms_void)
{
#if defined(OS_LINUX_SOC)
	sync(); 
	ms_system("reboot -f"); 
#else
	ms_funcNosupports;
#endif	
}
ms_void ms_api_poweroff(ms_void)
{
#if defined(OS_LINUX_SOC)
	sync(); 
	reboot(RB_POWER_OFF);
#else
	ms_funcNosupports;
#endif	
}
#undef MSREBOOT_C
